package com.aabte.design2.behavioral.mediator;

/**
 * @author Daniel
 * @version 1.0
 * @date 2020/5/3
 */
public abstract class Component {

    protected Mediator dialog;

    public Component(Mediator dialog) {
        this.dialog = dialog;
    }

    public void click() {
        dialog.notify(this, "click");
    }

    public void keypress() {
        dialog.notify(this, "keypress");
    }

}
